package com.woyowodaows.utils;

import android.text.InputFilter;
import android.text.SpannableString;
import android.widget.EditText;

/**
 * Created by Administrator on 2017/7/14.
 */

public class EditUtil {

    public static void setHint(EditText info, String hint){
        SpannableString s = new SpannableString(hint); //这里输入自己想要的提示文字
        info.setHint(s);

    }

    public static void setMaxLength(EditText editText, int length){
        InputFilter[] filters = {new InputFilter.LengthFilter(length)};
        editText.setFilters(filters);
    }



}
